-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: set the value from incoming payment in quote #862
Conversation
amount: value | ||
}) | ||
let convertedValue | ||
if (isIncomingPayment) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this approach. The users should be able send their desired amounts. If the incoming payment has a receive amount of 100EUR, we should not enforce to send 100EUR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I agree, the request might be 100EUR but the user ca decide to pay only 50EUR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the issue is that converting the value is not exact, so 20.15 euro will result in 100.02 roni (instead of expected 100)
I added a check that if the amount is off by less then 1% to set it to the amount in incoming payment
open to other suggestions if this does not make sense
…currency-fixed-send
Context
Changes
this PR will solve issues with internal cross-currencies payments.
External payments may still encounter this issue and it will be solved when Create
GetReceiver
GraphQL Admin Query rafiki#1005 will be implemented.